<%@page contentType="text/html; charset=utf-8" %>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonEdit.jsp" %>
<%@ include file="/commons/validation.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>物品移交登记</title>
<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript">
var closeVarTmp = null;
function submitFun(closeVar){
	closeVarTmp = closeVar;
	
	var isPass=$('submitForm').fireEvent("onSubmit");
	if(isPass){
		closeORopenButton();
		var param = Form.serialize('submitForm');
		var url = "${ctx }/system_occupationConfigAction.do?method=editArticleTransfer";
		new Ajax.Request(url,{method: 'post',parameters :param ,onSuccess : showResponse});
	}
}

function showResponse(response){
	closeORopenButton();
	ajaxSubmitException(response.responseText);
	if(response.responseText == "true" ){
		if(closeVarTmp){
			closeWinAndRefresh();
		}
		else{
			var iframe = findFrame('main');
			iframe.reloadList('articleTransferListPage');
			location.reload();
		}
	}
}

function closeWinAndRefresh(){
	 var iframe = findFrame('main');
	
	 iframe.reloadList('articleTransferListPage');
	
	 windowClose();
	
}

	//关闭或打开按钮事件
function closeORopenButton(){
	//$('window_footer').disabled= !$('window_footer').disabled;
	<c:if test="${thingHandoverCongfigVO.keyword == null}">
	$('btn1_22').disabled= !$('btn1_22').disabled;
	</c:if>
	$('btn1_42').disabled= !$('btn1_42').disabled;
	$('btn1_32').disabled= !$('btn1_32').disabled;
}
</script>
</head>

<body>
<form action="" method="post" name="submitForm" id="submitForm" class="required-validate">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg">
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle"><span class="window_head_intext">入伙发放资料登记</span></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td class="aux_header_line_2"></td>
  </tr>
  <tr>
    <td class="content"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="aux_outtable_color"><table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">

            <tr>
              <td class="aux_intable_td1">物品名称：</td>
              <td class="aux_intable_require"><table border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td>
	                    <input type="hidden" value="${thingHandoverCongfigVO.keyword }" maxlength="20" name="keyword" id="keyword" />
	                    <input <c:if test="${thingHandoverCongfigVO.keyword != null }">readonly="readonly"</c:if> name="thingHandoverCongfigName" id="thingHandoverCongfigName" maxlength="20" type="text" class="inputtext required validate-char" value="${thingHandoverCongfigVO.thingHandoverCongfigName }"  size="16"></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td valign="top" class="aux_intable_td1">物品说明：</td>
              <td class="aux_intable_td2">
                <textarea name="description" id="description" cols="26" rows="3" class="textareatext max-length-100">${thingHandoverCongfigVO.description }</textarea>
              </td>
            </tr>
			 <tr>
               <td class="aux_intable_td1">序 号：</td>
			   <td class="aux_intable_td2"><input name="sequence" id="sequence" type="text" class="inputtext int-range-0-999" maxlength="3" value="${thingHandoverCongfigVO.sequence }" size="16" /></td>
		     </tr>


        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="window_footer"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
        <c:if test="${thingHandoverCongfigVO.keyword == null }">
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_21"></td>
              <td class="buttonOffMiddle" id="btn1_22" onClick="javascript:submitFun(false);" onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)" onblur="btn_change(2)"><img src="${ctx}/images/ico_saveandnewfile.gif" alt="" width="14" height="14" border="0" align="absbottom"> 保存并新增</td>
              <td class="buttonOffRight" id="btn1_23"></td>
            </tr>
        </table>
        </c:if>
        </td>
        <td class="btn_between_space"></td> <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_41"></td>
              <td class="buttonOffMiddle" id="btn1_42" onClick="javascript:submitFun(true);" onMouseOver="btn_change_over(4)" onMouseOut="btn_change_out(4)" onblur="btn_change(4)">
              	<img src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom"> 保 存
              </td>
              <td class="buttonOffRight" id="btn1_43"></td>
            </tr>
        </table></td>
        <td class="btn_between_space"></td>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onClick="javascript:windowClose();" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)" onblur="btn_change(3)"><img src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14" border="0" align="absbottom"> 取 消</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
        </table></td>
      </tr>
    </table>
    <p>&nbsp;</p></td>
  </tr>
</table>
</form>
</body>
</html>